package com.itheima.service;

import com.itheima.Utils.MyBatisUtils;
import com.itheima.bean.User;
import com.itheima.mapper.UserMapper;
import org.apache.ibatis.session.SqlSession;


public class UserServiceImpl implements UserService {
    @Override
    public User login(User user) {
        SqlSession sqlSession = MyBatisUtils.getSqlSession();
        UserMapper mapper = sqlSession.getMapper(UserMapper.class);
       User users = mapper.SelectByUser(user);
        return users;
    }
}
